import request from '@/utils/request'
// 查询门禁列表
export function listGas(query) {
  return request({
    url: 'access/access/getAllAccessInfo',
    method: 'get',
    params: query
  })
}
// 查询门禁人员列表
export function listPeople(query) {
  return request({
    url: 'access/access/getAllUserInfo',
    method: 'get',
    params: query
  })
}
// 查询门禁打卡记录列表
export function listRecords(query) {
  return request({
    url: 'access/access/getAll',
    method: 'get',
    params: query
  })
}
// 查询门禁详细
export function getPost(query) {
  return request({
    url: 'access/access/getAccessById',
    method: 'get',
    params: query
  })
}

// 新增门禁
export function addPost(data) {
  return request({
    url: 'access/access/addAccess',
    method: 'post',
    data: data
  })
}

// 修改门禁
export function updatePost(data) {
  return request({
    url: 'gas/gas/edit',
    method: 'post',
    data: data
  })
}

// 删除门禁
export function delRegion(data) {
  return request({
    url: 'access/access/delAccess',
    method: 'post',
    data: data
  })
}
// 批量删除门禁
export function delRegionAll(data) {
  return request({
    url: 'gas/gas/delAll',
    method: 'post',
    data: data
  })
}
